package com.jeesite.modules.dataScreen.web.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
@ApiModel("用户登录请求参数")
public class LoginDto {

    @NotBlank(message = "用户名不能为空")
    @Length(min = 2, max = 20, message = "名称长度限制[2,20]")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;

    @NotBlank(message = "用户名不能为空")
    @Length(min = 6, max = 20, message = "密码长度限制[8,20]")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

}
